/**
 * @Author your name
 * @Date 2021-03-05 10:35:28
 * @LastEditTime 2021-03-05 10:43:29
 * @LastEditors Please set LastEditors
 * @Description In User Settings Edit
 * @FilePath \fed-e-task-04-06\code\angular-demo\src\app\store\selectors\counter.selectors.ts
 */
// src\app\store\selectors\counter.selectors.ts
import { createFeatureSelector, createSelector } from '@ngrx/store';
import { AppState } from '..';
import { counteFeatureKey, State } from '../reducers/counter.reducer';

export const selectCounter = createFeatureSelector<AppState, State>(counteFeatureKey)

export const selectCount = createSelector(selectCounter, state => state.count)